package com.im.server.enterprise.common.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.im.base.dao.BaseDAO;
import com.im.server.enterprise.common.bean.Department;

/**
 * 描述：
 * 
 * @author XiaHui
 * @date 2014年6月14日 下午4:17:01
 * @version 0.0.1
 */
@Repository
public class DepartmentDAO extends BaseDAO {

	public Department get(String id) {
		return this.readDAO.get(Department.class, id);
	}

	@SuppressWarnings("unchecked")
	public List<Department> getAllList() {
		String hql = "from " + Department.class.getName();
		List<Department> list = (List<Department>) this.readDAO.getHibernateTemplate().find(hql);
		return list;
	}
}
